﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        public ScaleLabels GetScale2Labels()
        {
            ScaleLabels scaleLabels = new ScaleLabels();
            scaleLabels.Visibility = IsCircular2ScaleLabelsEnabled ? Visibility.Visible : Visibility.Collapsed;
            scaleLabels.FontColor = Circular2ScaleLabelsFontColor==null? null : Circular2ScaleLabelsFontColor.Brush;
            scaleLabels.FontFamily = Circular2ScaleLabelsFontFamily;
            scaleLabels.FontSize = Circular2ScaleLabelsFontSize;
            scaleLabels.FontWeight = Circular2ScaleLabelsFontWeight;

            scaleLabels.Placement = Circular2ScaleLabelsPlacement;
            scaleLabels.RotationEnabled = Circular2ScaleLabelsRotationEnabled;

            return scaleLabels;
        }


        private BrushEx circular2ScaleLabelsFontColor;
        private FontFamily circular2ScaleLabelsFontFamily;
        private int circular2ScaleLabelsFontSize;
        private FontWeight circular2ScaleLabelsFontWeight;
        private double circular2ScaleLabelsInterval;
        private PlacementTypes circular2ScaleLabelsPlacement;
        private bool circular2ScaleLabelsRotationEnabled;

        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本字体颜色")]
        [Description("Circular2ScaleLabelsFontColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsFontColor", "标尺文本字体颜色")]
        public BrushEx Circular2ScaleLabelsFontColor
        {
            get
            {
                return circular2ScaleLabelsFontColor;
            }

            set
            {
                circular2ScaleLabelsFontColor = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本字体")]
        [Description("Circular2ScaleLabelsFontFamily")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsFontFamily", "标尺文本字体")]
        public FontFamily Circular2ScaleLabelsFontFamily
        {
            get
            {
                return circular2ScaleLabelsFontFamily;
            }

            set
            {
                circular2ScaleLabelsFontFamily = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本字体大小")]
        [Description("Circular2ScaleLabelsFontSize")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsFontSize", "标尺文本字体大小")]
        public int Circular2ScaleLabelsFontSize
        {
            get
            {
                return circular2ScaleLabelsFontSize;
            }

            set
            {
                circular2ScaleLabelsFontSize = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本字体粗细")]
        [Description("Circular2ScaleLabelsFontWeight")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsFontWeight", "标尺文本字体粗细")]
        public FontWeight Circular2ScaleLabelsFontWeight
        {
            get
            {
                return circular2ScaleLabelsFontWeight;
            }

            set
            {
                circular2ScaleLabelsFontWeight = value;
                Refresh();
            }
        }

        //[Category("第二表盘标尺文本")]
        //[DisplayName("第二表盘标尺文本步长")]
        //[Description("Circular2ScaleLabelsInterval")]
        //[Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsInterval", "标尺文本步长")]
        public double Circular2ScaleLabelsInterval
        {
            get
            {
                return circular2ScaleLabelsInterval;
            }

            set
            {
                circular2ScaleLabelsInterval = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本位置")]
        [Description("Circular2ScaleLabelsPlacement")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XPlacementTypesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsPlacement", "标尺文本位置")]
        public PlacementTypes Circular2ScaleLabelsPlacement
        {
            get
            {
                return circular2ScaleLabelsPlacement;
            }

            set
            {
                circular2ScaleLabelsPlacement = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本是否旋转")]
        [Description("Circular2ScaleLabelsRotationEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Circular2ScaleLabelsRotationEnabled", "标尺文本是否旋转")]
        public bool Circular2ScaleLabelsRotationEnabled
        {
            get
            {
                return circular2ScaleLabelsRotationEnabled;
            }

            set
            {
                circular2ScaleLabelsRotationEnabled = value;
                Refresh();
            }
        }
        [Category("第二表盘标尺文本")]
        [DisplayName("第二表盘标尺文本是否显示")]
        [Description("IsCircular2ScaleLabelsEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "IsCircular2ScaleLabelsEnabled", "标尺文本是否显示")]
        public bool IsCircular2ScaleLabelsEnabled
        {
            get
            {
                return isCircular2ScaleLabelsEnabled;
            }

            set
            {
                isCircular2ScaleLabelsEnabled = value;
                Refresh();
            }
        }

        private bool isCircular2ScaleLabelsEnabled;
    }
}
